import { storeToRefs } from 'pinia'
import { useDialogEvents } from '@/stores/dialogEvents.js'

import { Point } from '@/Utils/Point.js'
import { Zondy_docLayer } from '@/views/Home/Map/Hooks/initMap'
const { changeEvents } = storeToRefs(useDialogEvents())

export const changeEventAttr = () => {
  var fid = changeEvents.value.id_
  var service = {
    name: 'guanggu',
    layerId: 2
  }
  var docLayer = Zondy_docLayer

  var attr = [{ type: 'number', key: '处理状态', value: Number(changeEvents.value.处理状态) }]
  var color
  switch (attr[0].value) {
    case 0:
      color = 6
      break
    case 1:
      color = 4
      break
    case 2:
      color = 90
      break
  }
  Point.update({ fid, attr, color, docLayer, service })
}
